import axios, { AxiosRequestConfig } from 'axios'

import { ICustomerInfo } from '../interface'
import './__mock__'

/** 获取客户信息 */
export const apiGetCustomerInfo = async (
  waybillNo: string,
  signal?: AxiosRequestConfig['signal'],
): Promise<ICustomerInfo> => {
  return axios.post(`/tmsapi/waybill_record/getCustomerInfo`, { waybillNo }, { signal }).then(res => res.$data)
}
